package com.ynny.chapter05;

import jakarta.servlet.ServletException;
import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

import java.io.IOException;

@WebServlet("/demo06")
public class Demo06Servlet extends HttpServlet {

    //往请求作用域中放一个用户 userName = "张三";

    @Override
    protected void service(HttpServletRequest request,
                           HttpServletResponse response) throws ServletException, IOException {

        Object sum = request.getAttribute("sum");

        System.out.println(sum);


    }
}
